<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>注册</title>
</head>
<body>
<div th:if= "${success}" th:text="${success}"></div>
<div th:if="${error}" th:text="${error}"></div>
<form action="/register" method="post" th:object="${user}">
  账号：<input type="text" name="username" th:field="*{name}">
  密码：<input type="password" name="password" th:field="*{password}">
  性别：<input type="text" name="sex" th:field="*{sex}">
  <input type="submit" value="注册">
</form>
</body>
</html>